﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
 
namespace Model.WXshopBuiness
{
 /// <summary>
 /// 带有直销信息的用户模型
 /// </summary>
    public class ZXUserInfoModel  
    {
        ///<summary>
        ///
        ///<summary>
        public string UserID { get; set; }
        ///<summary>
        ///
        ///<summary>
        public int GradeID { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string UserCode { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string Account { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string Password { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string OpenId { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string NickName { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string WXAccount { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string Area { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string HeadUrl { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string ParentID { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string IDPath { get; set; }
        ///<summary>
        ///
        ///<summary>
        public DateTime? CreateTime { get; set; }


        public string StrCreateTime
        {
            get
            {
                return CreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
            }
        }
        ///<summary>
        ///0：禁用，1：启用
        ///<summary>
        public int State { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string ProjectID { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string Email { get; set; }
        ///<summary>
        ///0：保密 1：女2：男
        ///<summary>
        public string Sex { get; set; }
        ///<summary>
        ///
        ///<summary>
        public DateTime? BirthDay { get; set; }
        ///<summary>
        ///0：否1：是
        ///<summary>
        public int IsAutoSynchro { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string TJCode { get; set; }
        ///<summary>
        ///0:微信 1：app 2：pc
        ///<summary>
        public int RegisterSource { get; set; }
        ///<summary>
        ///
        ///<summary>
        public decimal TotalSaleMoney { get; set; }
        ///<summary>
        ///
        ///<summary>
        public decimal TotalBonusMoney { get; set; }
        ///<summary>
        ///
        ///<summary>
        public decimal BonusBalance { get; set; }
        ///<summary>
        ///
        ///<summary>
        public decimal TotalRequestMoney { get; set; }
        ///<summary>
        ///
        ///<summary>
        public decimal ScoreBalance { get; set; }
        ///<summary>
        ///
        ///<summary>
        public decimal FrozenBalance { get; set; }
        ///<summary>
        ///
        ///<summary>
        public decimal FrozenScore { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string UnionId { get; set; }
        ///<summary>
        ///
        ///<summary>
        public DateTime? ExpireTime { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string CompanyName { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string UserName { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string IDCard { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string Mobile { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string PayPwd { get; set; }
        ///<summary>
        ///
        ///<summary>
        public int IsFocus { get; set; }
        ///<summary>
        ///
        ///<summary>
        public DateTime? FocusTime { get; set; }
        ///<summary>
        ///
        ///<summary>
        public DateTime? CancelTime { get; set; }
        ///<summary>
        ///
        ///<summary>
        public int IsTrade { get; set; }
        ///<summary>
        ///
        ///<summary>
        public int IsRealAuth { get; set; }
        ///<summary>
        ///
        ///<summary>
        public int IsGoldAuth { get; set; }
        ///<summary>
        ///
        ///<summary>
        public int IsCompanyAuth { get; set; }
        ///<summary>
        ///
        ///<summary>
        public int IsAuth { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string RedOpenId { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string PayOpenId { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string AuthOpenId { get; set; }
        ///<summary>
        ///
        ///<summary>
        public string MsgOpenId { get; set; }
        ///<summary>
        ///
        ///<summary>
        public DateTime? LastLoginTime { get; set; }
        ///<summary>
        ///
        ///<summary>
        public int IsMobileAuth { get; set; }
        /// <summary>
        /// 额外加开这个表，是为了建立一套完全独立于微信的用户系统
        /// 直销系统中会使用的
        /// 直销系统用户ID
        /// </summary>
        public long? ZX_UserID { get; set; }
        ///<summary>
        ///用户直销系统里用户名
        ///<summary>
        public string ZX_UserName { get; set; }
        /// <summary>
        /// 密码 （现阶段不设定密码）
        /// </summary>
        public string ZX_UserPwd { get; set; }
        ///<summary>
        ///级别
        ///<summary>
        public int? ZX_UserLevel { get; set; }
        ///<summary>
        ///上级
        ///<summary>
        public long? ZX_UserParentId { get; set; }
        ///<summary>
        ///用户来源 0 自行关注注册 1 微信推荐而来 依次类推
        ///<summary>
        public int? ZX_UserSource { get; set; }

        public int?  ZX_UserType { get; set; }

        public long? JiFeng { get; set; }

        public string BindPhone { get; set; }
        public string BindQQ { get; set; }
        public string BindWeiXin { get; set; }
        public string BindZhiFuBao { get; set; }
        public string BindBankCard { get; set; }
        public decimal? HaveEarnMoney { get; set; }
        public bool IsBindInfo {
            get {
                if (string.IsNullOrEmpty(BindWeiXin) && string.IsNullOrEmpty(BindZhiFuBao) && string.IsNullOrEmpty(BindBankCard))
                {
                    return false;
                }
                return true;
            }
        }
    }
}
